<template>
  <music-list :songs="songs" :bg-img="bg" :name="name"></music-list>
</template>

<script>
    import MusicList from "@/components/music-list/MusicList";
    import {getDiscSong} from "@/common/js/song";

    export default {
        name: "DiscSong",
        components: {MusicList},
        mounted(){
            this.getSong()
        },
        computed:{
            bg(){
                return this.$route.params.avatar
            },
            name(){
                return this.$route.params.desc
            }
        },
        data(){
            return {
                songs: []
            }
        },
        methods:{
            async getSong(){
              this.songs = await getDiscSong(this.$route.params.id)
            }
        }

    }
</script>

<style scoped>

</style>
